﻿// JavaScript Document
var modelpoint = jClass({
    _constructor: function (x, y) {
        this.x = x;
        this.y = y;
    },
    x: null,
    y: null,
    xShow: function () {
        alert(this.x);
    },
    yShow: function () {
        alert(this.y);
    },
    parentcallName: function (name) {
        alert("The " + name + " at " + this.x + "," + this.y);
    }
});
//var basemodel = new modelpoint(20, 30);

var submodelpoint = jClass.extend(modelpoint, {
    callName: function (msg) {
        alert(msg + " is " + this.x + ":" + this.y);
    }
});

function testClass() {
    var mypoint = new submodelpoint(23, 30);
    mypoint.callName("wanqi");
    mypoint.parentcallName("wanhaijin,xiongmaonv");
}
